package com.imc.api.attence.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.persistence.*;
import java.util.Date;
import java.util.List;

/*
 * 类描述：课程实体类
 * 开发者：tanweiping
 * 创建日期：2018/10/28 20:52
 */
@Entity
@Table(name = "t_lesson")
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Data
@Accessors(chain = true)
public class Lesson {
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Integer id;//主键ID
    private String lessonName;//课程名称
    private String lessonDate;//课程时间
    private String price;//价格
    private String groupPrice;//组团价格
    private String classSize;//班级大小
    private String startDate;//开始时间
    private String endDate;//结束时间
    private String photo;//照片
    private String teacherId;//老师ID
    private String address;//地址
    private String mDesc;//描述

    @Column(length = 2)
    private String payType;

    @Column(length = 4)
    private Integer stock;

    @Column(length = 2)
    private String lessonType;//类型为3，为充值套餐

    public String getDesc() {
        return this.mDesc;
    }

    @Transient
    private String desc;//描述
    @Transient
    private String trueName;//真实名称
    private String state;//状态

    private String videoUrl;//视频地址
    private Integer hot;//是否热
    private String categoryId;//分类ID

    @Column(length = 8)
    private Integer orgId;//组织机构ID list
}